home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / genial / ui / cursor.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  984 b   |  41 lines

  1. /*
  2.  * cursor.c -- routines to set / reset the cursors of the UI
  3.  *
  4.  */
  5.  
  6. /* NOTE: need to fix this to find ALL open windows and change cursor
  7.    ( or maybe there is a way just do some parent window ??)  */
  8.  
  9. #include <stdio.h>
  10. #include "display.h"
  11. #include "ui.h"
  12.  
  13. /* set the cursor to busy */
  14. set_watch_cursor()
  15. {
  16.   int cshape=XC_watch;
  17.   Cursor cursor;
  18.  
  19.   cursor=XCreateFontCursor(display, cshape);
  20.   XDefineCursor(display, xv_get(canvas_paint_window(file_win->controls1),
  21.                 XV_XID), cursor);  
  22.   XDefineCursor(display, xv_get(canvas_paint_window(base_win->controls1),
  23.                 XV_XID), cursor);  
  24.   XFlush(display);
  25. }
  26.  
  27. /*set cursor back to normal */
  28. unset_watch_cursor()
  29. {
  30.   int cshape=XC_top_left_arrow;
  31.   Cursor cursor;
  32.  
  33.   cursor=XCreateFontCursor(display, cshape);
  34.   XDefineCursor(display, xv_get(canvas_paint_window(file_win->controls1),
  35.                 XV_XID), cursor);  
  36.   XDefineCursor(display, xv_get(canvas_paint_window(base_win->controls1),
  37.                 XV_XID), cursor);  
  38.   XFlush(display);
  39. }
  40.  
  41.